<?php \common\components\widgets\JsBlock::begin(); ?>
    <script>
        $.ajax({
            url: 'http://39.104.148.186/api/public/index',
            success: function (msg) {
                console.log(msg);
            }
        });
    </script>
<?php \common\components\widgets\JsBlock::end(); ?>